package demo05;

public class Demo {
	public static void main(String[] args) {
		FizzBuzz fb= new FizzBuzz(15);
		Thread fizz=new Thread(()->{
			while(fb.getCount()<fb.getN()){
				fb.fizz();
			}
		});
		Thread buzz=new Thread(()->{
			while(fb.getCount()<fb.getN()){
				fb.buzz();
			}
		});
		Thread fizzbuzz=new Thread(()->{
			while(fb.getCount()<fb.getN()){
				fb.fizzbuzz();}
		});
		Thread number=new Thread(()->{
			while(fb.getCount()<fb.getN()){
				fb.number();}
		});
		fizz.start();buzz.start();fizzbuzz.start();number.start();
	}
}
